home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00a.txt
/
000024_icon-group-sender _Fri Feb 4 13:42:53 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id NAA06340
for icon-group-addresses; Fri, 4 Feb 2000 13:42:45 -0700 (MST)
Message-Id: <200002042042.NAA06340@baskerville.CS.Arizona.EDU>
Date: Fri, 04 Feb 2000 07:57:00 -0700
From: Steve Wampler <swampler@noao.edu>
X-Accept-Language: en
To: Kostas Oikonomou <oikonomou@att.com>,
icon-group <icon-group@optima.CS.Arizona.EDU>
Subject: Re: calling a C routine from icont
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Kostas Oikonomou wrote:
>
> Is it possible to call a C routine for which you have only a header available,
> and whose code exists only in a library (no source available)?
>
> I've looked through the code in the cfuncs directory, and I'm not sure if what I
> want is doable.
>
> My situation is that I have an X library that does specialized plotting of data,
> and I'd like to call some of its routines from my Icon program.
>
> Some example routine headers are
>
> void hs_initialize(char *id_string);
> void hs_update(void);
> void hs_complete(void);
> void hs_complete_and_wait(void);
> void hs_histoscope(int return_immediately);
> void hs_kill_histoscope(void);
> int hs_create_1d_hist(int uid, char *title, char *category,
> char *x_label, char *y_label,
> int n_bins, float min, float max);
Kosta,
Yes, it is possible, but you'll need to do it indirectly. That is, you'll
need to write (in C) wrapper functions to convert the data types between
Icon's view of the world and C's. There are functions available to help
with those conversions, check the documentation on calling C functions
from Icon (sorry, but I've forgotten which document it is, but the
icon web page should point you to it).
--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler@noao.edu